-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-72944] reduce spacing in buildhistory widget #9122
Conversation
the logic when name, details and badges arrangement is changed so that the available space is better used. The stop action is no longer treated as separate thing, instead it is just like all other badges. The stop button will always be in the far right. The width calculation now considers the actual width of the content and not of the element they are in. When name and badges fit in one row they will be joined. badges are using a flex layout that should allow for better alignement and will automatically wrap the elements though this only happen now when the badges are in their own row and still to large Add a resize handler so when the sidepanel switch to/from tablet mode or size is changed in tablet mode then the table layout is recalculated. [JENKINS-70246] the sidepanel is now fixed width when total width is larger than 900px.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't closed inspected the JavaScript, its quite complex. Something like handlebars would likely clean the code up a lot but may be complicated by the fact the badges are loaded in via jelly
Screenshots and testing looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested your PR locally, it looks fine security wise.
However, I've noticed minor bugs.
When I build an empty freestyle project and add a build description, the ordering gets messed up, placing the description first and the left bar in the middle of the character. Note that this seems to only happen on the last build.
Also, when there are no badges on my build, I encounter some errors.
given ongoing work by @janfaracik in #9148 to rewrite the build history widget does it make sense to merge this? |
Let's mark as on-hold, we can always pick it back up later if needed. /label on-hold |
Please take a moment and address the merge conflicts of your pull request. Thanks! |
close in favor of #9148 |
the logic when name, details and badges arrangement is changed so that the available space is better used.
The stop action is no longer treated as separate thing, instead it is just like all other badges. The stop button will always be in the far right. The width calculation now considers the actual width of the content and not of the element they are in. When name and badges fit in one row they will be joined.
badges are using a flex layout that should allow for better alignement and will automatically wrap the elements though this only happen now when the badges are in their own row and still to large
Add a resize handler so when the sidepanel switch to/from tablet mode or size is changed in tablet mode then the table layout is recalculated.
The pictures show builds with many badges (gerrit, build trigger badge, keep build forever, job config change, disk usage)
Screenshots before
Full width window:~850px width window
min-width window (483px)
Running build
after going to full-screen from min-width window
Screenshots after
Full width window with running build
~850px width window
min-width window (483px)
See JENKINS-72944.
Testing done
Manual testing
Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist